/**
 * 
 */
package trigger;

/**
 * @author Philip
 *
 */
public abstract class AbstractTrigger implements Trigger {
	protected String trigger;
	protected String[] response;
	protected String receiver;
	protected int rank;
	
	public AbstractTrigger(String trigger, String response, int rank) {
		this.trigger = trigger;
		this.response = response.split("\n");
		this.receiver = "";
		this.rank = rank;
	}

	@Override
	public abstract String trigger();

	@Override
	public abstract String response();
	
	@Override
	public abstract String response(int i);
	
	@Override
	public int rank() {
		return rank;
	}
	
	@Override
	public int linesInResponse() {
		return response.length;
	}
	
	@Override
	public abstract boolean triggers(String message);

	@Override
	public abstract void updateVariables(String nickName, String sender, String receiver, String senderHostname, String input);
}
